package org.kjtc.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.kjtc.entity.Page;
import org.kjtc.entity.StatisticsReport;
import org.springframework.stereotype.Service;

@Service("statisticsReportService")
public class StatisticsReportService extends BaseService {

	@SuppressWarnings("unchecked")
	public List<StatisticsReport> getStatisticsReportPage(StatisticsReport statisticsReport, Page page) throws Exception {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("info", statisticsReport);
		map.put("page", page);
		return (List<StatisticsReport>) this.getDaoSupport().findForList("T_StatisticsReport.getStatisticsReportPage", map);
	}
	
	@SuppressWarnings("unchecked")
	public List<Object> getStatisticsReport(StatisticsReport statisticsReport) throws Exception {
		return (List<Object>) this.getDaoSupport().findForList("T_StatisticsReport.getStatisticsReport", statisticsReport);
	}
	
	public int saveStatisticsReport(StatisticsReport statisticsReport) throws Exception {
		return (int) this.getDaoSupport().update("T_StatisticsReport.insertStatisticsReport", statisticsReport);
	}
	
	public int updateStatisticsReport(StatisticsReport statisticsReport) throws Exception {
		return (int) this.getDaoSupport().update("T_StatisticsReport.updateStatisticsReport", statisticsReport);
	}
	
	public int deleteStatisticsReport(StatisticsReport statisticsReport) throws Exception {
		return (int) this.getDaoSupport().update("T_StatisticsReport.deleteStatisticsReport", statisticsReport);
	}
}
